<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>面试相关</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }

      a {
        text-decoration: none;
      }

      nav {
        border: 2px solid rgb(245, 201, 97);
        max-width: 600px;
        height: 10vh;
        display: flex;
        /* flex-direction: column; */
        justify-content: space-around;
        text-align: center;
        /*  1vh=10px*/
        line-height: 100px;
      }
    </style>
  </head>

  <body>
    <main>
      <nav>
        <a href="./HTML/Box-model.html">盒子模型</a>
        <a href="./HTML/element concealment.html">元素隐藏</a>
        <a href="./HTML/center.html">居中</a>
      </nav>
    </main>
    <script>
      let arr1 = [6, 34, 3];
      function bubbleSort(arr) {
        var len = arr.length;
        for (var i = 0; i < len - 1; i++) {
          for (var j = 0; j < len - 1 - i; j++) {
            if (arr[j] > arr[j + 1]) {
              // 相邻元素两两对比
              var temp = arr[j + 1]; // 元素交换
              arr[j + 1] = arr[j];
              arr[j] = temp;
            }
          }
        }
        return arr;
      }
      console.log(bubbleSort(arr1));
    </script>
  </body>
</html>
